<x-inner class="au-inner">
  <div class="au-panel au-tree-left" [x-loading]="treeLoading" style="width: 22rem;">
    <h4>
      <span>组织机构</span>
      <x-link
        icon="fto-plus"
        title="增加根节点"
        [disabled]="!auth['add-root']"
        (click)="auth['add-root'] && action('add-root', selected)"
      ></x-link>
    </h4>
    <x-tree
      #treeCom
      au-adaption
      [outerHeight]="100"
      [data]="data"
      expandedLevel="0"
      [activatedId]="activatedId"
      [nodeHeight]="1.875"
      [actions]="treeActions"
      (activatedChange)="action('info', $event)"
    >
    </x-tree>
  </div>
  <div class="au-form-right">
    <au-tool>
      <x-buttons [space]="0.5">
        <x-button
          icon="fto-save"
          type="primary"
          (click)="!formGroup.invalid && !disabled && action('save', selected)"
          [disabled]="formGroup.invalid || disabled"
        >
          保存
        </x-button>
      </x-buttons>
    </au-tool>
    <x-form
      class="au-panel au-overflow-auto"
      au-adaption
      [outerHeight]="128"
      [formGroup]="formGroup"
      [controls]="controls"
      [disabled]="disabled"
      direction="row"
      labelSuffix=":"
      labelWidth="6rem"
      width="24rem"
      labelAlign="end"
      span="20"
      space="2"
    ></x-form>
  </div>
</x-inner>
